<layout name="page" />
<block name="content">
	<style>
		.sub_menu {
			height: 600px;
			overflow-y: auto;
		}
	</style>
	{:widget('page_header/search',array('name'=>'转交客户','search'=>'S'))}
	<div class="operate-panel">
		<a class="btn" onclick="go_return_url();">返回</a>
		<div class="split"></div>
		<a id="btn_save" class="btn">保存</a>
	</div>
	<!-- 列表显示区域  -->
	<div class="sub-frame">
		<form id="form_data" name="form_data" method="post">
			<div class="sub-sidebar big">
				<table class="table table-bordered">
					<thead>
						<tr>
							<th class="text-center checkbox">
							<input type="checkbox" class="toggle-select-all" data="contact_id[]"/>
							</th>
							<th>姓名</th>
							<th>公司</th>
							<th>部门</th>
							<th>职位</th>
							<th>业务员</th>
							<th>产品</th>
						</tr>
					</thead>
					<tbody class="tbody">
						<volist name="contact_list" id="vo">
							<tr id="{$vo.id}">
								<td class="text-center checkbox ">
								<input type="checkbox" name="contact_id[]" value="{$vo.id}" />
								</td>
								<td>
								<nobr>
									{$vo.name}

								</nobr></td>
								<td>
								<nobr>
									{$vo.compnay_name}

								</nobr></td>
								<td>
								<nobr>
									{$vo.dept}

								</nobr></td>
								<td>
								<nobr>
									{$vo.position}

								</nobr></td>
								<td>
								<nobr>
									{$vo.salesman_name}

								</nobr></td>
								<td>
								<nobr>
									{$vo.product}

								</nobr></td>
							</tr>
						</foreach>
					</tbody>
				</table>
			</div>
			<div class="sub-content small">
				<table class="table table-bordered">
					<thead>
						<tr>
							<th>&nbsp;</th>
							<th>
							<nobr>
								姓名

							</nobr></th>
							<th>
							<nobr>
								部门

							</nobr></th>
							<th>
							<nobr>
								职位

							</nobr></th>
						</tr>
					</thead>
					<tbody>
						<volist name="user_list" id="data">
							<tr id="{$data.id}">
								<td class="col-4 x-radio">
								<input type="radio" id="user_{$data.id}" name="user_id" value="{$data.id}" />
								</td>
								<td>{$data.name}</td>
								<td>
								<nobr>
									{$data.dept_name}

								</nobr></td>
								<td>
								<nobr>
									{$data.position_name}

								</nobr></td>
							</tr>
						</foreach>
					</tbody>
				</table>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
			var $ = layui.jquery;
			$("#btn_save").click(function() {
				var vars = $("#form_data").serialize();
				send_ajax("{:url('transfer_save')}", vars, function(ret) {
					if (ret.status) {
						layer.msg(ret.info);
						location.reload(true);
					} else {
						layer.msg(ret.info);
					}
				});
			})
		});
	</script>
</block>